<script>
export default {
  created() {
    const { params, query } = this.$route;
    const { path } = params;
    // 加入记录但清掉缓存
    if (!query.refresh) {
      this.$router.replace({ path: "/" + path, query });
    } else {
      this.$router.replace(query);
    }
  },
  render: function(h) {
    return h(); // avoid warning message
  }
};
</script>
